<script setup>
import top from './component/top.vue';

const userName = $ref('xxxxxxxxxxxxxxxx')
function myFun(name,pwd,age){
  console.log('父组件中的方法')
  console.log(name)
  console.log(pwd)
  console.log(age)
}
</script>

<template>
  <h1>1、父组件向子组件传递参数</h1>
  <h1>2、子组件向父组件传递参数</h1>
  <h1>3、参数数据类型、默认值、校验</h1>
  用户名:<input type="text" v-model="userName"><br/>
  <top :user-name="userName" sex="男" @execfun="myFun" @fun01="myFun"></top>

</template>
